function lunbo(){
    let oBan = document.getElementById('banner');
    let imgLi = oBan.getElementsByClassName('img')[0].getElementsByTagName('li');
    let navLi = oBan.getElementsByClassName('bannav')[0].getElementsByTagName('li');
    var n = 0;
    var timer = null;
    imgLi[0].style.opacity = 1;
    navLi[0].className = 'on';

    for(let i = 0; i < navLi.length; i++){
        navLi[i].index = i;
        navLi[i].onmouseenter = function(){
            for(let i = 0; i < navLi.length; i++){
                navLi[i].className = '';
                myTool.bufferMove(imgLi[i], {opacity: 0});
            }
            n = this.index;
            this.className = 'on';
            myTool.bufferMove(imgLi[n], {opacity: 100});
        }
    }

    function autoplay(){
        n++;
        if(n >= imgLi.length){
            n = 0;
        }

        for(let i = 0; i < navLi.length; i++){
            navLi[i].className = '';
            myTool.bufferMove(imgLi[i], {opacity: 0});
        }
        navLi[n].className = 'on';
        myTool.bufferMove(imgLi[n], {opacity: 100});
    }

    timer = setInterval(autoplay, 2000);

    oBan.onmouseenter = function(){
        clearInterval(timer);
    }

    oBan.onmouseleave = function(){
        timer = setInterval(autoplay, 2000);
    }
}